//////////////
/* Hlavicky */
#include "main.h"
#include "window\window.h"
//////////////

/////////////////////////////////////
/* Deklarace globalnich promennych */
CWindow g_mWindow;
CInput g_mInput;
bool g_mState = false;

/////////////////////
/* Definice funkci */
#ifdef _WIN32
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
#else
int main(void)
#endif
{
	g_mWindow.mBitsPerPixel = 24;
  g_mWindow.mFullscreen = false;
	g_mWindow.mWidth = 800;
	g_mWindow.mHeight = 600;
#ifdef _WIN32
  g_mWindow.mDeviceContext = NULL;
  g_mWindow.mInstance = NULL;
#endif
  g_mWindow.mOglContext = NULL;
  g_mWindow.mWindow = NULL;

	winCreateWindow(&g_mWindow);

	while(!g_mState)
	{
		winProcessMessage(&g_mWindow, &g_mInput, &g_mState);
	}

  winReleaseWindow(&g_mWindow);
	
  // We finished successfully
#ifdef _WIN32
  return (g_mWindow.mMsg.wParam);
#else
  return 0;
#endif
}
/////////////////////